package com.jojo.bubble.service.impl;

import com.jojo.bubble.entity.Admin;
import com.jojo.bubble.dao.AdminDao;
import com.jojo.bubble.service.AdminService;
import org.springframework.stereotype.Service;

import java.util.List;

import javax.annotation.Resource;

/**
 * 管理员(Admin)表服务实现类
 *
 * @author jojo
 * @since 2023-07-21 04:47:26
 */
@Service("adminService")
public class AdminServiceImpl implements AdminService {
    @Resource
    private AdminDao adminDao;

    @Override
    public int count(Admin record) {
        return this.adminDao.count(record);
    }

    @Override
    public int insert(Admin record) {
        return this.adminDao.insert(record);
    }

    @Override
    public int update(Admin record) {
        return this.adminDao.update(record);
    }

    @Override
    public Admin getInfo(int id) {
        return this.adminDao.queryById(id);
    }

    @Override
    public List<Admin> getList(Admin record) {
        return this.adminDao.getList(record);
    }

    @Override
    public int delete(int id) {
        return this.adminDao.delete(id);
    }

    @Override
    public Admin getRecordByName(String username) {
        return adminDao.queryByName(username);
    }
}
